package com.deuwise.system.controller;

import com.deuwise.common.utils.Result;
import com.deuwise.system.entity.DeptDO;
import com.google.gson.JsonObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @author deuwise
 * @date 2018-11-09 10:29:13
 */
@Api(tags = "错误码模块", description = "错误码模块")
@RequestMapping("api/errorCode")
@RestController()
public class ErrorController {


    /**
     * 错误码模块
     */
    @ApiOperation(value = "获取错误码提示")
    @GetMapping("/getErrorCode")
    public Result<HashMap<String,String>> info() {
        HashMap<String,String> hashMap=new HashMap<>();
        hashMap.put("403","系统未授权部署请联系管理员");
        hashMap.put("402","文件不存在");
        hashMap.put("44004","token认证失败");
        hashMap.put("44003","token已过期");
        hashMap.put("44002","token已注销");
        hashMap.put("44001","token不合法");
        hashMap.put("44000","token生成失败");
        hashMap.put("44111","无权限访问");
        hashMap.put("500","服务错误,请联系管理员");
        hashMap.put("200","操作成功");
        hashMap.put("0","操作成功");
        return Result.ok(hashMap);
    }
}
